<template>
  <div class="box">
    <el-row :gutter="20">
      <el-col :span="7" >
        <div class="flex-clone">
          <span>本月工资金额</span>
          <div><span class="f-24-bo">0</span>(元)</div>
          <span>月同比0%</span>
        </div>
      </el-col>
      <el-col :span="7">
        <div class="flex-clone">
          <span>本月在职员工</span>
          <div><span class="f-24-bo">0</span>(人)</div>
          <span>月同比0%</span>
        </div>
      </el-col>
      <el-col :span="7">
        <div class="flex-clone">
          <span>本月离职员工</span>
          <div><span class="f-24-bo">0</span>(人)</div>
        </div>
      </el-col>
    </el-row>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="我的账户" name="first">
        <span>辽宁盘锦公司-1240001</span>

        <el-row type="flex" justify="space-between">
          <el-col :span="6">
            <div>当前页共10项</div>
          </el-col>
          <el-col :span="10">
            <div>
              <el-button type="primary" @click="onSubmit">新增</el-button>
              <el-button type="primary" @click="onSubmit">删除</el-button>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <div>
              <el-table
                ref="multipleTable"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
                @selection-change="handleSelectionChange"
              >
                <el-table-column type="selection" width="55"> </el-table-column>
                <el-table-column label="序号" width="120">
                  <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column prop="name" label="所属网点" width="120">
                </el-table-column>
                <el-table-column prop="address" label="配置名称" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="name" label="导出类型" width="120">
                </el-table-column>
                <el-table-column prop="name" label="导出对象名称" width="120">
                </el-table-column>
                <el-table-column prop="name" label="自动导出日期" width="120">
                </el-table-column>
                <el-table-column prop="name" label="创建日期" width="120">
                </el-table-column>
                <el-table-column prop="name" label="操作" width="120"> </el-table-column>
              </el-table>
            </div>
          </el-col>
        </el-row>
        <div class="block" style="display: flex; justify-content: end">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[100, 200, 300, 400]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400"
          >
          </el-pagination>
        </div>
      </el-tab-pane>
      <el-tab-pane label="充值扣款审核" name="second">
        <el-row>
          <el-col :span="24">
            <div class="header">
              <el-form ref="form" :model="form" label-width="100px" class="flex-start">
                <el-form-item label="账单名称">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择活动区域"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="时间范围" style="width: 600px">
                  <div class="flex">
                    <el-radio v-model="radio" label="1">出账时间</el-radio>
                    <el-radio v-model="radio" label="2">收款时间</el-radio>
                    <el-date-picker
                      v-model="value1"
                      type="datetimerange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                    >
                    </el-date-picker>
                  </div>
                </el-form-item>
                <el-form-item label="账单类型">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择账单类型"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" @click="onSubmit">查询</el-button>
                  <el-button>重置</el-button>
                </el-form-item>
                <el-form-item label="账单对象">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择账单对象"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="收款状态">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择收款状态"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="结算科目">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择结算科目"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="数据来源">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择数据来源"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="所属业务员">
                  <el-select
                    v-model="form.region"
                    placeholder="请选择所属业务员"
                    style="width: 286px"
                  >
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="单号">
                  <el-input
                    v-model="form.name"
                    placeholder="请输入单号"
                    style="width: 286px"
                  ></el-input>
                </el-form-item>
              </el-form>
            </div>
          </el-col>
        </el-row>
        <el-row type="flex" justify="space-between">
          <el-col :span="6">
            <div>当前页共10项</div>
          </el-col>
          <el-col :span="10">
            <div>
              <span style="color: red; font-size: 18px"
                >温馨提示: 已收金额不为0的账单无法删除，如需删除请先反核销
                操作收款登记)</span
              >
              <el-button type="primary" @click="onSubmit">新增</el-button>
              <el-button type="primary" @click="onSubmit">删除</el-button>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <div>
              <el-table
                ref="multipleTable"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
                @selection-change="handleSelectionChange"
              >
                <el-table-column type="selection" width="55"> </el-table-column>
                <el-table-column label="序号" width="120">
                  <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column prop="name" label="所属网点" width="120">
                </el-table-column>
                <el-table-column prop="address" label="配置名称" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="name" label="导出类型" width="120">
                </el-table-column>
                <el-table-column prop="name" label="导出对象名称" width="120">
                </el-table-column>
                <el-table-column prop="name" label="自动导出日期" width="120">
                </el-table-column>
                <el-table-column prop="name" label="创建日期" width="120">
                </el-table-column>
                <el-table-column prop="name" label="操作" width="120"> </el-table-column>
              </el-table>
            </div>
          </el-col>
        </el-row>
        <div class="block" style="display: flex; justify-content: end">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[100, 200, 300, 400]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400"
          >
          </el-pagination>
        </div>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeName: "first",
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        currentPage4: 4,
        desc: "",
      },
      tableData: [
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-08",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-06",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-07",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>

<style lang="scss" scoped>
.box {
  padding: 20px;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-clone {
  display: flex;
  justify-content: space-around;
  // align-items: center;
  height: 80px;
  flex-flow: column;
}

.border-r {
  border-right: 1px solid #d8d8d8;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.f-24-b {
  font-size: 24px;
  color: #2087d0;
}

.f-24-bo {
  font-size: 24px;
  color: #333333;
}

.header {
  padding-bottom: 20px;
  border-bottom: 1px solid #ccc;
}

.el-row {
  margin-bottom: 20px;

  &:last-child {
    margin-bottom: 0;
  }
}

.el-col {
  border-radius: 4px;
}

.bg-purple-dark {
  background: #99a9bf;
}

.bg-purple {
  background: #d3dce6;
}

.bg-purple-light {
  background: #e5e9f2;
}

.grid-content {
  border-radius: 4px;
  min-height: 36px;
}

.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>
